package czh.cocoa.graphics;

import android.graphics.Typeface;
import czh.cocoa.foundation.NSObject;
import czh.cocoa.foundation.NSString;

public class CGFont extends NSObject {
	
	public final static NSString DEFAULT_FONT_NAME = NSTR("default_font");
	
	public final static NSString DEFAULT_BOLD_FONT_NAME = NSTR("default_bold_font");
	
	public final static NSString DEFAULT_ITALIC_FONT_NAME = NSTR("default_italic_font");
	
	public final static NSString DEFAULT_BOLD_ITALIC_FONT_NAME = NSTR("default_bold_italic_font");
	
	private Typeface mTypeface;
	
	public CGFont(NSString fontName) {
		if (fontName.isEqual(CGFont.DEFAULT_BOLD_FONT_NAME)) {
			mTypeface = Typeface.defaultFromStyle(Typeface.BOLD);
		} else if (fontName.isEqual(CGFont.DEFAULT_ITALIC_FONT_NAME)) {
			mTypeface = Typeface.defaultFromStyle(Typeface.ITALIC);
		} else if (fontName.isEqual(CGFont.DEFAULT_BOLD_ITALIC_FONT_NAME)) {
			mTypeface = Typeface.defaultFromStyle(Typeface.BOLD_ITALIC);
		} else {
			mTypeface = Typeface.defaultFromStyle(Typeface.NORMAL);
		} 
	}
	
	public Typeface typeface() {
		return mTypeface;
	}

}
